package com.seller.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seller.dao.SellerDao;
import com.seller.service.SellerManager;
import com.seller.vo.Seller;

@Service("sser")
public class SellerManagerImpl implements SellerManager {
	
	@Autowired(required=true)
	private SellerDao sd ;
	
	@Transactional
	@Override
	public int registSeller(Seller seller) {
		System.out.println("=======service:regist==========="); 
		System.out.println("password:" +seller.getSellerPsd());
		return sd.addSeller(seller);
	}

	@Override
	public Seller loginSeller(String sellerTel, String sellerPsd) {
		System.out.println("=======service:login==========="); 
		System.out.println("password:" + sellerPsd);
		return sd.findSeller2(sellerTel, sellerPsd);
	}
	
	@Override
	public Seller loginSeller2(Seller seller) {
		System.out.println("=======service:login2==========="); 
		System.out.println("password:" + seller.getSellerPsd());
		return sd.findSeller2(seller.getSellerTel(),seller.getSellerPsd());
	}

}
